<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta name="layout" content="mobile">
    <title>Register New User</title>
  </head>
  <body>
    <h1>Register New User</h1>
    
   <g:hasErrors>
    <div class="errors">
      <g:renderErrors bean="${user}" as="list" />
    </div>
   </g:hasErrors>
  
  <g:if test="${flash.message}">
    <div class="flash">${flash.message}</div>
  </g:if>
    
    <form action="register">
      <table>
        <tr>
          <td>Username: </td>
          <td><g:textField name="username" value="${user?.username}" /></td>
        </tr>
        <tr>
          <td>Password: </td>
          <td><g:passwordField name="password" value="${user?.password}" /></td>
        </tr>
        <tr>
          <td>Repeat Password: </td>
          <td><g:passwordField name="repeatPassword" value="" /></td>
        </tr>
        <tr>
          <td>First Name: </td>
          <td><g:textField name="firstName" value="${user?.firstName}" /></td>
        </tr>
        <tr>
          <td>Last Name: </td>
          <td><g:textField name="lastName" value="${user?.lastName}" /></td>
        </tr>
        <tr>
          <td>Email: </td>
          <td><g:textField name="email" value="${user?.email}" /></td>
        </tr>
      </table>
      <g:submitButton name="register" value="Register" />
    </form>
  </body>
</html>
